@use "sass:math";
@import "../../css/variables";

.community-profile {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  flex-direction: column;

  img {
    width: 150px;
    height: 150px;
    border-radius: 75px;
    border: 1px solid $gray-200;
    display: inline-block;
  }

  .lazyload, .lazyloading {
    opacity: 0;
  }

  .lazyloaded {
    opacity: 1;
    transition: opacity 300ms;
  }

  .community-profile-name {
    font-weight: 400;
    margin-top: 0.5rem;
  }

  .community-profile-role {
    text-transform: uppercase;
  }

  .community-profile-location {
    margin-top: 0.5rem;
    color: $gray-600;
  }

  .community-profile-map-pin {
    margin-bottom: 2px;
  }

  .community-profile-social {
    margin-top: 0.5rem;

    a {
      color: $gray-800;

      svg {
        transition: transform $button-transition-time $button-transition-ease;
      }

      &:hover {
        svg {
          transform: scale(1.1);
        }
      }

      &:not(:last-child) {
        margin-right: math.div($spacer, 3) * 2;
      }
    }
  }

  &.large {
    @media (max-width: $xl) {
      min-width: 25%;
      margin: 1.5rem;
    }

    @media (max-width: $md) {
      min-width: 30%;
      margin: 1.5rem;
    }

    @media (max-width: $sm) {
      min-width: 80%;
    }

    .community-profile-name {
      margin-top: 0.75rem;
      font-size: 1.2rem;
    }

    .community-profile-location {
      margin-top: 0.75rem;
    }

    .community-profile-social {
      margin-top: 0.75rem;
    }
  }

  &.small {
    margin: 0.5rem;

    img {
      width: 75px;
      height: 75px;
    }
  }

  &.medium {
    margin: 1rem;
    margin-bottom: 2rem;
    min-width: 15%;

    @media (max-width: $lg) {
      min-width: 18%;
    }

    @media (max-width: $md) {
      min-width: 20%;
    }

    @media (max-width: $sm) {
      min-width: 40%;
    }

    .community-profile-map-pin {
      width: 1.2em;
    }

    img {
      width: 110px;
      height: 110px;
    }
  }
}
